﻿/*------------------------------------------------
// File Description: UserWorkshop DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-02-25 21:59:00
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 用户车间表
    /// </summary>
    [Table(nameof(UserWorkshop))]
    public class UserWorkshop : BaseEntity
    {
        private string _workshopCode;
        private string _workshopName;

        #region Public Property

        ///<Summary>
        /// 用户ID
        ///</Summary>
        public int UserId { get; set; }

        ///<Summary>
        /// 车间代码
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 用户车间表
        /// </summary>
        public virtual DbSet<UserWorkshop> UserWorkshops { get; set; }
    }
}
